<template>
  <div class="home-container">
    <!-- 1. 英雄区（Banner） -->
    <section class="hero-section">
      <div class="hero-content">
        <h1 class="hero-title">让 AI 赋能学习，开启个性化教育新时代！</h1>
        <a-button type="primary" size="large" class="hero-button" ><RouterLink to="/user/login" class="login-link">体验 AI 助手</RouterLink></a-button>
      </div>
      <div class="hero-background"></div>
    </section>

    <!-- 2. 核心功能展示区 -->
    <section class="feature-section">
      <div class="section-header scroll-animate">
        <h2 class="section-title">大模型赋能的智能化教学、实验、科研支撑环境</h2>
        <p class="section-subtitle">
          Large Model-enabled Platforms for Intelligent Teaching, Learning, Experimenting and
          Research activities
        </p>
      </div>

      <div class="feature-cards scroll-animate">
        <a-row :gutter="[24, 24]">
          <a-col :xs="24" :sm="12" :lg="6">
            <a-card class="feature-card scroll-animate delay-100">
              <template #cover>
                <div class="feature-icon">
                  <robot-outlined class="icon" />
                </div>
              </template>
              <a-card-meta title="智能助教">
                <template #description>实时答疑、精准解答，让学习过程更高效</template>
              </a-card-meta>
            </a-card>
          </a-col>

          <a-col :xs="24" :sm="12" :lg="6">
            <a-card class="feature-card scroll-animate delay-200">
              <template #cover>
                <div class="feature-icon">
                  <solution-outlined class="icon" />
                </div>
              </template>
              <a-card-meta title="实时练习评测助手">
                <template #description>根据学生历史练习情况，生成随练题目，并对练习纠错</template>
              </a-card-meta>
            </a-card>
          </a-col>

          <a-col :xs="24" :sm="12" :lg="6">
            <a-card class="feature-card scroll-animate delay-300">
              <template #cover>
                <div class="feature-icon">
                  <file-text-outlined class="icon" />
                </div>
              </template>
              <a-card-meta title="AI生成教学资源">
                <template #description>一键生成题库、讲义和PPT，提高教学效率</template>
              </a-card-meta>
            </a-card>
          </a-col>

          <a-col :xs="24" :sm="12" :lg="6">
            <a-card class="feature-card scroll-animate delay-400">
              <template #cover>
                <div class="feature-icon">
                  <code-outlined class="icon" />
                </div>
              </template>
              <a-card-meta title="远程命令行">
                <template #description>基于Docker代码沙箱实现的在线判题系统，安全高效</template>
              </a-card-meta>
            </a-card>
          </a-col>
        </a-row>
      </div>

      <div class="feature-tabs scroll-animate">
        <a-tabs>
          <a-tab-pane key="1" tab="智能助教" class="feature-tab-content">
            <a-row>
              <a-col :span="12">
                <div class="tab-video-container">
                  <video class="tab-video" controls loop muted autoplay>
                    <source src="@/assets/vedio/vedio1.mp4" type="video/mp4" />
                    您的浏览器不支持视频标签
                  </video>
                </div>
              </a-col>
              <a-col :span="12">
                <div class="tab-content">
                  <h3>智能助教</h3>
                  <p>
                    基于大模型的智能助教系统，能够实时回答学生问题，提供个性化学习指导。系统可以理解学生的学习进度，针对性地给出建议，帮助学生克服学习难点。
                  </p>
                </div>
              </a-col>
            </a-row>
          </a-tab-pane>
          <a-tab-pane key="2" tab="实时练习评测" class="feature-tab-content">
            <a-row>
              <a-col :span="12">
                <div class="tab-video-container">
                  <video class="tab-video" controls loop muted autoplay>
                    <source src="@/assets/vedio/vedio1.mp4" type="video/mp4" />
                    您的浏览器不支持视频标签
                  </video>
                </div>
              </a-col>
              <a-col :span="12">
                <div class="tab-content">
                  <h3>实时练习评测助手</h3>
                  <p>
                    智能评测系统根据学生的学习历史和能力水平，自动生成适合的练习题目。系统能够对学生提交的答案进行实时评测，指出错误并给出详细的解析和改进建议。
                  </p>
                </div>
              </a-col>
            </a-row>
          </a-tab-pane>
          <a-tab-pane key="3" tab="AI生成教学资源" class="feature-tab-content">
            <a-row>
              <a-col :span="12">
                <div class="tab-video-container">
                  <video class="tab-video" controls loop muted autoplay>
                    <source src="@/assets/vedio/vedio1.mp4" type="video/mp4" />
                    您的浏览器不支持视频标签
                  </video>
                </div>
              </a-col>
              <a-col :span="12">
                <div class="tab-content">
                  <h3>AI生成教学资源</h3>
                  <p>
                    教师只需输入关键知识点和教学目标，系统就能自动生成包括课件、习题、教案在内的完整教学资源包。智能优化内容结构，提供多样化的教学素材。
                  </p>
                </div>
              </a-col>
            </a-row>
          </a-tab-pane>
          <a-tab-pane key="4" tab="远程命令行" class="feature-tab-content">
            <a-row>
              <a-col :span="12">
                <div class="tab-video-container">
                  <video class="tab-video" controls loop muted autoplay>
                    <source src="@/assets/vedio/vedio1.mp4" type="video/mp4" />
                    您的浏览器不支持视频标签
                  </video>
                </div>
              </a-col>
              <a-col :span="12">
                <div class="tab-content">
                  <h3>远程命令行</h3>
                  <p>
                    基于Docker容器技术的代码沙箱，为编程学习提供安全可靠的运行环境。支持多种编程语言，实时编译运行代码，并给出运行结果和性能分析报告。
                  </p>
                </div>
              </a-col>
            </a-row>
          </a-tab-pane>
        </a-tabs>
      </div>
    </section>

    <!-- 3. 优势特点区 -->
    <section class="advantage-section">
      <div class="section-header scroll-animate">
        <h2 class="section-title">课程建设与课堂教学工具</h2>
        <p class="section-subtitle">Course Construction and Classroom Teaching Toolsets</p>
      </div>

      <div class="advantage-cards scroll-animate">
        <a-row :gutter="[36, 36]">
          <a-col :xs="24" :sm="24" :md="12" :lg="8">
            <div class="advantage-card scroll-animate delay-100">
              <div class="advantage-icon">
                <book-outlined />
              </div>
              <div class="advantage-content">
                <h3>智能课程建设</h3>
                <p>
                  头实惠基于大模型纳智能走远程的历史和新建资料库，构建配套的课程图谱、知识库、智能体验，形成AI课程。
                </p>
              </div>
            </div>
          </a-col>

          <a-col :xs="24" :sm="24" :md="12" :lg="8">
            <div class="advantage-card scroll-animate delay-200">
              <div class="advantage-icon">
                <robot-outlined />
              </div>
              <div class="advantage-content">
                <h3>智能助教导教</h3>
                <p>
                  头实惠供基于大模型的问答、学习、审题、诊断等智能助教和导学工具，全面减轻教师团队的重复性工作。
                </p>
              </div>
            </div>
          </a-col>

          <a-col :xs="24" :sm="24" :md="12" :lg="8">
            <div class="advantage-card scroll-animate delay-300">
              <div class="advantage-icon">
                <user-outlined />
              </div>
              <div class="advantage-content">
                <h3>智能数字教师</h3>
                <p>
                  头实课堂配合炉型课程资源，结合大模型和3D虚拟数字人等技术，为课堂教学活动提供智能数字教师。
                </p>
              </div>
            </div>
          </a-col>

          <a-col :xs="24" :sm="24" :md="12" :lg="8">
            <div class="advantage-card scroll-animate delay-400">
              <div class="advantage-icon">
                <file-search-outlined />
              </div>
              <div class="advantage-content">
                <h3>智能资源推荐</h3>
                <p>
                  头实课堂和实验环境能够结合学生当前学习情况，推荐适近度最高的学习与练习资源，提升个性化学习效果。
                </p>
              </div>
            </div>
          </a-col>

          <a-col :xs="24" :sm="24" :md="12" :lg="8">
            <div class="advantage-card scroll-animate delay-500">
              <div class="advantage-icon">
                <solution-outlined />
              </div>
              <div class="advantage-content">
                <h3>智能试卷组卷</h3>
                <p>
                  头实考试系统能够在线过滤上传的文档、扫描文件、图像等材料，自动生成试题记录卷，并支持智能组卷。
                </p>
              </div>
            </div>
          </a-col>

          <a-col :xs="24" :sm="24" :md="12" :lg="8">
            <div class="advantage-card scroll-animate delay-100">
              <div class="advantage-icon">
                <read-outlined />
              </div>
              <div class="advantage-content">
                <h3>智能阅卷评分</h3>
                <p>
                  头实考试系统支持选择题、问答题、编程题等多种题型的自动化阅卷，为每位学生成果报告。
                </p>
              </div>
            </div>
          </a-col>
        </a-row>
      </div>
    </section>

    <!-- 4. 功能模块展示区 -->
    <section class="modules-section">
      <div class="section-header scroll-animate">
        <h2 class="section-title">智能教学功能模块</h2>
        <p class="section-subtitle">Intelligent Teaching Function Modules</p>
      </div>

      <div class="modules-showcase scroll-animate">
        <div class="modules-layout">
          <!-- 左侧：功能卡片展示区 -->
          <div class="cards-section">
            <div class="cards-grid">
              <!-- 学生端功能卡片 -->
              <div
                class="module-card student-module scroll-animate delay-100"
                @click="router.push('/student/learning_assistant')"
              >
                <div class="module-icon">
                  <robot-outlined />
                </div>
                <div class="module-content">
                  <h4>学习助手</h4>
                  <p>AI智能答疑，个性化学习指导</p>
                  <div class="module-badge">学生</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div
                class="module-card student-module scroll-animate delay-200"
                @click="router.push('/student/practice_assistant')"
              >
                <div class="module-icon">
                  <solution-outlined />
                </div>
                <div class="module-content">
                  <h4>实时练习评测</h4>
                  <p>智能题目生成，实时评测反馈</p>
                  <div class="module-badge">学生</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div
                class="module-card student-module scroll-animate delay-300"
                @click="router.push('/student/practice_program')"
              >
                <div class="module-icon">
                  <code-outlined />
                </div>
                <div class="module-content">
                  <h4>编程练习</h4>
                  <p>在线编程环境，多语言支持</p>
                  <div class="module-badge">学生</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>

              <!-- 教师端功能卡片 -->
              <div
                class="module-card teacher-module scroll-animate delay-400"
                @click="router.push('/teacher/course_design')"
              >
                <div class="module-icon">
                  <book-outlined />
                </div>
                <div class="module-content">
                  <h4>备课与设计</h4>
                  <p>智能课程建设，AI辅助备课</p>
                  <div class="module-badge">教师</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div
                class="module-card teacher-module scroll-animate delay-500"
                @click="router.push('/teacher/generate_ppt')"
              >
                <div class="module-icon">
                  <file-ppt-outlined />
                </div>
                <div class="module-content">
                  <h4>智能生成PPT</h4>
                  <p>一键生成课件，多种模板选择</p>
                  <div class="module-badge">教师</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div
                class="module-card teacher-module"
                @click="router.push('/teacher/generate_knowledgeGraph')"
              >
                <div class="module-icon">
                  <global-outlined />
                </div>
                <div class="module-content">
                  <h4>知识图谱生成</h4>
                  <p>可视化知识结构，智能关联分析</p>
                  <div class="module-badge">教师</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div
                class="module-card teacher-module"
                @click="router.push('/teacher/exam_generation')"
              >
                <div class="module-icon">
                  <form-outlined />
                </div>
                <div class="module-content">
                  <h4>考核内容生成</h4>
                  <p>智能组卷系统，自动阅卷评分</p>
                  <div class="module-badge">教师</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div
                class="module-card teacher-module"
                @click="router.push('/teacher/resourceManagement')"
              >
                <div class="module-icon">
                  <folder-outlined />
                </div>
                <div class="module-content">
                  <h4>我的资源</h4>
                  <p>教学资源管理，分类整理存储</p>
                  <div class="module-badge">教师</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div
                class="module-card teacher-module"
                @click="router.push('/teacher/student_analysis')"
              >
                <div class="module-icon">
                  <bar-chart-outlined />
                </div>
                <div class="module-content">
                  <h4>学情数据分析</h4>
                  <p>学习数据统计，智能分析报告</p>
                  <div class="module-badge">教师</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>

              <!-- 管理员功能卡片 -->
              <div class="module-card admin-module" @click="router.push('/admin/dashboard')">
                <div class="module-icon">
                  <dashboard-outlined />
                </div>
                <div class="module-content">
                  <h4>控制台</h4>
                  <p>大屏概览，系统运行状态监控</p>
                  <div class="module-badge">管理员</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div class="module-card admin-module" @click="router.push('/admin/user_management')">
                <div class="module-icon">
                  <team-outlined />
                </div>
                <div class="module-content">
                  <h4>用户管理</h4>
                  <p>用户账户管理，权限分配控制</p>
                  <div class="module-badge">管理员</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div class="module-card admin-module" @click="router.push('/admin/resource_admin')">
                <div class="module-icon">
                  <database-outlined />
                </div>
                <div class="module-content">
                  <h4>资源管理</h4>
                  <p>系统资源管理，文件存储配置</p>
                  <div class="module-badge">管理员</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
              <div
                class="module-card admin-module"
                @click="router.push('/admin/prompt_management')"
              >
                <div class="module-icon">
                  <book-outlined />
                </div>
                <div class="module-content">
                  <h4>提示词管理</h4>
                  <p>AI提示词配置，智能对话优化</p>
                  <div class="module-badge">管理员</div>
                </div>
                <div class="module-arrow">
                  <right-outlined />
                </div>
              </div>
            </div>
          </div>

          <!-- 右侧：端分类展示区 -->
          <div class="sides-section">
            <div class="side-categories">
              <!-- 学生端 -->
              <div class="side-category student-side scroll-animate slide-left delay-100">
                <div class="side-icon">
                  <user-outlined />
                </div>
                <div class="side-content">
                  <h3>学生端</h3>
                  <p>学习助手、实时练习、编程练习</p>
                  <div class="side-badge">3个功能</div>
                </div>
              </div>

              <!-- 教师端 -->
              <div class="side-category teacher-side scroll-animate slide-left delay-200">
                <div class="side-icon">
                  <team-outlined />
                </div>
                <div class="side-content">
                  <h3>教师端</h3>
                  <p>备课设计、智能PPT、知识图谱、考核生成、资源管理、数据分析</p>
                  <div class="side-badge">6个功能</div>
                </div>
              </div>

              <!-- 管理员端 -->
              <div class="side-category admin-side scroll-animate slide-left delay-300">
                <div class="side-icon">
                  <setting-outlined />
                </div>
                <div class="side-content">
                  <h3>管理员端</h3>
                  <p>控制台、用户管理、资源管理、提示词管理</p>
                  <div class="side-badge">4个功能</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <ToTop />
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { ref, onMounted, onUnmounted } from 'vue'
import {
  BookOutlined,
  RobotOutlined,
  UserOutlined,
  FileSearchOutlined,
  SolutionOutlined,
  ReadOutlined,
  CodeOutlined,
  FileTextOutlined,
  TeamOutlined,
  FilePptOutlined,
  GlobalOutlined,
  FormOutlined,
  FolderOutlined,
  BarChartOutlined,
  SettingOutlined,
  RightOutlined,
  DashboardOutlined,
  DatabaseOutlined,
} from '@ant-design/icons-vue'
import ToTop from '@/components/ToTop.vue'

const router = useRouter()

// 滚动动画相关
const animatedElements = ref<HTMLElement[]>([])

// 检查元素是否在视口中
const isInViewport = (element: HTMLElement) => {
  const rect = element.getBoundingClientRect()
  const windowHeight = window.innerHeight || document.documentElement.clientHeight
  return (
    rect.top <= windowHeight * 0.8 && // 当元素顶部到达视口80%位置时触发
    rect.bottom >= 0
  )
}

// 添加动画类
const addAnimationClass = (element: HTMLElement) => {
  if (!element.classList.contains('animate-in')) {
    element.classList.add('animate-in')
  }
}

// 滚动处理函数
const handleScroll = () => {
  animatedElements.value.forEach((element) => {
    if (isInViewport(element)) {
      addAnimationClass(element)
    }
  })
}

// 初始化动画元素
const initAnimatedElements = () => {
  const elements = document.querySelectorAll('.scroll-animate')
  animatedElements.value = Array.from(elements) as HTMLElement[]
}

onMounted(() => {
  // 延迟初始化，确保DOM已渲染
  setTimeout(() => {
    initAnimatedElements()
    handleScroll() // 初始检查
  }, 100)

  window.addEventListener('scroll', handleScroll, { passive: true })
})

onUnmounted(() => {
  window.removeEventListener('scroll', handleScroll)
})
</script>

<style scoped>
.home-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* 英雄区样式 */
.hero-section {
  position: relative;
  height: 85vh;
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  padding: 0 8%;
  perspective: 1000px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1677ff, #722ed1, #13c2c2);
  background-size: 300% 300%;
  z-index: -1;
  animation: gradientMove 20s ease infinite;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);
}

.hero-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  animation: gridMove 15s linear infinite;
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(10px, 10px);
  }
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-content {
  padding: 0 20px;
  max-width: 850px;
  z-index: 1;
  animation: fadeIn 1.2s ease-out;
  transform-style: preserve-3d;
}

.hero-content::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 20px;
  animation: glowPulse 3s ease-in-out infinite;
  z-index: -1;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 40px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
  letter-spacing: 1px;
  line-height: 1.2;
  animation: titleFloat 4s ease-in-out infinite;
  position: relative;
}

.hero-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  transform: translateX(-50%);
  animation: titleUnderline 3s ease-in-out infinite;
}

@keyframes titleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes titleUnderline {
  0%,
  100% {
    width: 0;
    opacity: 0;
  }
  50% {
    width: 80%;
    opacity: 1;
  }
}

.hero-button {
  height: 54px;
  font-size: 1.25rem;
  padding: 0 45px;
  border-radius: 27px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  animation: buttonPulse 2s ease-in-out infinite;
}

.hero-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.hero-button:hover::before {
  left: 100%;
}

.hero-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

@keyframes buttonPulse {
  0%,
  100% {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
  }
}

/* 通用部分样式 */
section {
  padding: 100px 8%;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 70px;
  animation: slideUp 0.8s ease-out;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 2.6rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #222;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, #1677ff, #722ed1);
  transform: translateX(-50%);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.3rem;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
  margin-top: 25px;
}

/* 核心功能展示区样式 */
.feature-section {
  background: linear-gradient(to bottom, #f9f9f9, #f0f7ff);
  overflow: hidden;
}

.feature-cards {
  margin-bottom: 80px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.feature-card {
  height: 100%;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-radius: 12px;
  overflow: hidden;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  position: relative;
  animation: cardFloat 6s ease-in-out infinite;
  animation-delay: calc(var(--card-index, 0) * 0.5s);
}

.feature-card:nth-child(1) {
  --card-index: 0;
}
.feature-card:nth-child(2) {
  --card-index: 1;
}
.feature-card:nth-child(3) {
  --card-index: 2;
}
.feature-card:nth-child(4) {
  --card-index: 3;
}

.feature-card:hover {
  transform: translateY(-12px) rotateY(5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  animation-play-state: paused;
}

@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0) rotateY(0);
  }
  50% {
    transform: translateY(-5px) rotateY(2deg);
  }
}

.feature-icon {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1677ff, #4096ff);
  color: white;
  position: relative;
  overflow: hidden;
}

.feature-icon::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
  left: -100%;
  transition: all 0.7s ease;
}

.feature-card:hover .feature-icon::before {
  left: 100%;
}

.feature-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}

.feature-card:hover .feature-icon::after {
  width: 200px;
  height: 200px;
}

.icon {
  font-size: 48px;
  z-index: 1;
  animation: iconRotate 8s linear infinite;
  transition: all 0.3s ease;
}

.feature-card:hover .icon {
  animation-play-state: paused;
  transform: scale(1.2) rotate(360deg);
}

@keyframes iconRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.feature-tabs {
  margin-top: 80px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 15px;
  background-color: white;
  overflow: hidden;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 30px;
}

:deep(.ant-tabs-nav) {
  margin-bottom: 0 !important;
  background-color: #f9f9f9;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

:deep(.ant-tabs-tab) {
  padding: 16px 30px !important;
  font-size: 18px !important;
  transition: all 0.3s !important;
}

:deep(.ant-tabs-ink-bar) {
  height: 3px !important;
  background: linear-gradient(to right, #1677ff, #4096ff) !important;
}

.tab-video-placeholder {
  background: linear-gradient(135deg, #e6f7ff, #f0f5ff);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #1677ff;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.tab-video-placeholder::after {
  content: '视频演示';
  position: absolute;
  font-size: 18px;
}

.tab-content {
  padding: 40px 50px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #fff;
}

.tab-content h3 {
  font-size: 2rem;
  margin-bottom: 25px;
  color: #222;
  font-weight: bold;
}

.tab-content p {
  font-size: 1.15rem;
  color: #555;
  line-height: 1.8;
}

.tab-video-container {
  width: 100%;
  height: 380px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-video-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(22, 119, 255, 0.1), rgba(114, 46, 209, 0.1));
  border-radius: 16px;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-video-container:hover::before {
  opacity: 1;
}

.tab-video-container:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border-color: rgba(22, 119, 255, 0.3);
}

.tab-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.tab-video-container:hover .tab-video {
  transform: scale(1.05);
}

/* 视频播放控制按钮样式 */
/* .tab-video-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  z-index: 3;
  opacity: 0.8;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231677ff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: 30px 30px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
 */
.tab-video-container:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
  background-color: rgba(255, 255, 255, 1);
}

/* 视频加载状态 */
.tab-video-container.loading::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231677ff'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 视频播放进度条样式 */
.tab-video-container .video-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  z-index: 3;
}

.tab-video-container .video-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1677ff, #4096ff);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 0 0 16px 16px;
}

/* 视频时间显示 */
.tab-video-container .video-time {
  position: absolute;
  bottom: 10px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-video-container:hover .video-time {
  opacity: 1;
}

/* 视频加载动画 */
.tab-video-container.loading {
  animation: videoPulse 2s ease-in-out infinite;
}

@keyframes videoPulse {
  0%,
  100% {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 15px 35px rgba(22, 119, 255, 0.3);
  }
}

/* 视频播放状态指示器 */
.tab-video-container.playing::after {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

/* 视频错误状态 */
.tab-video-container.error::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff4d4f'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
  background-color: rgba(255, 77, 79, 0.1);
}

/* 视频全屏按钮 */
.tab-video-container .fullscreen-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-video-container:hover .fullscreen-btn {
  opacity: 1;
}

.tab-video-container .fullscreen-btn:hover {
  background: rgba(22, 119, 255, 0.8);
  transform: scale(1.1);
}

/* 视频音量控制 */
.tab-video-container .volume-control {
  position: absolute;
  bottom: 15px;
  left: 15px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-video-container:hover .volume-control {
  opacity: 1;
}

.tab-video-container .volume-control:hover {
  background: rgba(22, 119, 255, 0.8);
  transform: scale(1.1);
}

/* 优势特点区样式 */
.advantage-section {
  background-color: #ffffff;
  position: relative;
}

.advantage-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, #f0f7ff, #ffffff);
  z-index: 0;
}

.advantage-cards {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-wrap: wrap;
}

.advantage-card {
  display: flex;
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  padding: 35px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  position: relative;
  animation: advantageSlide 8s ease-in-out infinite;
  animation-delay: calc(var(--advantage-index, 0) * 0.8s);
}

.advantage-card:nth-child(1) {
  --advantage-index: 0;
}
.advantage-card:nth-child(2) {
  --advantage-index: 1;
}
.advantage-card:nth-child(3) {
  --advantage-index: 2;
}
.advantage-card:nth-child(4) {
  --advantage-index: 3;
}
.advantage-card:nth-child(5) {
  --advantage-index: 4;
}
.advantage-card:nth-child(6) {
  --advantage-index: 5;
}

.advantage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(24, 144, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.advantage-card:hover::before {
  left: 100%;
}

.advantage-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: rgba(24, 144, 255, 0.2);
  animation-play-state: paused;
}

@keyframes advantageSlide {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

.advantage-icon {
  flex: 0 0 70px;
  height: 70px;
  background: linear-gradient(135deg, #1677ff, #4096ff);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 28px;
  margin-right: 25px;
  box-shadow: 0 5px 15px rgba(24, 144, 255, 0.3);
  transition: all 0.3s ease;
}

.advantage-card:hover .advantage-icon {
  transform: scale(1.1) rotate(5deg);
}

.advantage-content {
  flex: 1;
}

.advantage-content h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #222;
  position: relative;
  padding-bottom: 15px;
}

.advantage-content h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(to right, #1677ff, #4096ff);
  border-radius: 3px;
}

.advantage-content p {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.7;
}

/* 功能模块展示区样式 */
.modules-section {
  background: linear-gradient(to bottom, #ffffff, #f0f7ff);
  position: relative;
  padding-bottom: 120px;
}

.modules-showcase {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.module-group {
  animation: slideInUp 0.8s ease-out;
  animation-delay: calc(var(--group-index, 0) * 0.2s);
}

.module-group:nth-child(1) {
  --group-index: 0;
}
.module-group:nth-child(2) {
  --group-index: 1;
}
.module-group:nth-child(3) {
  --group-index: 2;
}

.module-group-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #222;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 12px;
}

.module-group-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #1677ff, #4096ff);
  border-radius: 3px;
}

.group-icon {
  font-size: 20px;
  color: #1677ff;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* 左右布局容器 */
.modules-layout {
  display: flex;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: flex-start;
}

/* 左侧：功能卡片展示区 */
.cards-section {
  flex: 2;
  min-width: 0;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  justify-items: center;
}

/* 右侧：端分类展示区 */
.sides-section {
  flex: 1;
  min-width: 300px;
}

.side-categories {
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: sticky;
  top: 20px;
}

/* 模块卡片样式 */
.module-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 280px;
  height: 120px;
  animation: cardFloat 8s ease-in-out infinite;
  animation-delay: calc(var(--card-index, 0) * 0.3s);
}

/* 右侧端分类样式 */
.side-category {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: slideInRight 0.8s ease-out;
  animation-delay: calc(var(--side-index, 0) * 0.2s);
}

.side-category:nth-child(1) {
  --side-index: 0;
}
.side-category:nth-child(2) {
  --side-index: 1;
}
.side-category:nth-child(3) {
  --side-index: 2;
}

.side-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  transition: all 0.3s ease;
}

.student-side::before {
  background: linear-gradient(to bottom, #52c41a, #73d13d);
}

.teacher-side::before {
  background: linear-gradient(to bottom, #1677ff, #4096ff);
}

.admin-side::before {
  background: linear-gradient(to bottom, #722ed1, #9254de);
}

.side-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.side-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.side-category:hover .side-icon {
  transform: scale(1.1) rotate(5deg);
}

.student-side .side-icon {
  background: linear-gradient(135deg, #52c41a, #73d13d);
}

.teacher-side .side-icon {
  background: linear-gradient(135deg, #1677ff, #4096ff);
}

.admin-side .side-icon {
  background: linear-gradient(135deg, #722ed1, #9254de);
}

.side-content {
  flex: 1;
  min-width: 0;
}

.side-content h3 {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: #222;
  transition: color 0.3s ease;
}

.side-category:hover .side-content h3 {
  color: #1677ff;
}

.side-content p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 12px;
}

.side-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

.student-side .side-badge {
  background: linear-gradient(45deg, #52c41a, #73d13d);
}

.teacher-side .side-badge {
  background: linear-gradient(45deg, #1677ff, #4096ff);
}

.admin-side .side-badge {
  background: linear-gradient(45deg, #722ed1, #9254de);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.module-card:nth-child(1) {
  --card-index: 0;
}
.module-card:nth-child(2) {
  --card-index: 1;
}
.module-card:nth-child(3) {
  --card-index: 2;
}
.module-card:nth-child(4) {
  --card-index: 3;
}
.module-card:nth-child(5) {
  --card-index: 4;
}
.module-card:nth-child(6) {
  --card-index: 5;
}

.module-card:nth-child(1) {
  --card-index: 0;
}
.module-card:nth-child(2) {
  --card-index: 1;
}
.module-card:nth-child(3) {
  --card-index: 2;
}
.module-card:nth-child(4) {
  --card-index: 3;
}
.module-card:nth-child(5) {
  --card-index: 4;
}
.module-card:nth-child(6) {
  --card-index: 5;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(24, 144, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.module-card:hover::before {
  left: 100%;
}

.module-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  animation-play-state: paused;
}

@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.module-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  margin-bottom: 12px;
  position: relative;
  transition: all 0.3s ease;
}

.module-card:hover .module-icon {
  transform: scale(1.1) rotate(5deg);
}

.student-module .module-icon {
  background: linear-gradient(135deg, #52c41a, #73d13d);
}

.teacher-module .module-icon {
  background: linear-gradient(135deg, #1677ff, #4096ff);
}

.admin-module .module-icon {
  background: linear-gradient(135deg, #722ed1, #9254de);
}

.module-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.module-content h4 {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 6px;
  color: #222;
  transition: color 0.3s ease;
}

.module-card:hover .module-content h4 {
  color: #1677ff;
}

.module-content p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
  margin-bottom: 8px;
}

.module-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0;
}

.student-module .module-badge {
  background: linear-gradient(45deg, #52c41a, #73d13d);
}

.teacher-module .module-badge {
  background: linear-gradient(45deg, #1677ff, #4096ff);
}

.admin-module .module-badge {
  background: linear-gradient(45deg, #722ed1, #9254de);
}

.module-arrow {
  color: #ccc;
  font-size: 14px;
  transition: all 0.3s ease;
  margin-top: 6px;
}

.module-card:hover .module-arrow {
  color: #1677ff;
  transform: translateY(-2px);
}

.tech-showcase {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.tech-cards {
  margin-bottom: 80px;
}

.tech-card {
  height: 130px;
  margin-bottom: 25px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  animation: techBounce 10s ease-in-out infinite;
  animation-delay: calc(var(--tech-index, 0) * 0.3s);
}

.tech-card:nth-child(1) {
  --tech-index: 0;
}
.tech-card:nth-child(2) {
  --tech-index: 1;
}
.tech-card:nth-child(3) {
  --tech-index: 2;
}
.tech-card:nth-child(4) {
  --tech-index: 3;
}
.tech-card:nth-child(5) {
  --tech-index: 4;
}
.tech-card:nth-child(6) {
  --tech-index: 5;
}

.tech-card:hover {
  transform: translateY(-6px) rotateZ(2deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  animation-play-state: paused;
}

@keyframes techBounce {
  0%,
  100% {
    transform: translateY(0) rotateZ(0);
  }
  25% {
    transform: translateY(-3px) rotateZ(1deg);
  }
  75% {
    transform: translateY(-2px) rotateZ(-1deg);
  }
}

.tech-card-inner {
  height: 100%;
  background: linear-gradient(135deg, #1677ff, #722ed1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.tech-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.5s ease;
  transform: skewX(-15deg);
}

.tech-card:hover .tech-card-inner::before {
  left: 100%;
}

.tech-card-inner h3 {
  font-size: 1.3rem;
  font-weight: bold;
  position: relative;
  z-index: 1;
}

.tech-logos {
  margin: 70px auto;
  text-align: center;
  max-width: 1200px;
}

.tech-logo {
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 10px;
  color: white;
  font-size: 17px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  animation: logoGlow 12s ease-in-out infinite;
  animation-delay: calc(var(--logo-index, 0) * 0.5s);
  position: relative;
}

.tech-logo:nth-child(1) {
  --logo-index: 0;
}
.tech-logo:nth-child(2) {
  --logo-index: 1;
}
.tech-logo:nth-child(3) {
  --logo-index: 2;
}
.tech-logo:nth-child(4) {
  --logo-index: 3;
}
.tech-logo:nth-child(5) {
  --logo-index: 4;
}
.tech-logo:nth-child(6) {
  --logo-index: 5;
}
.tech-logo:nth-child(7) {
  --logo-index: 6;
}
.tech-logo:nth-child(8) {
  --logo-index: 7;
}
.tech-logo:nth-child(9) {
  --logo-index: 8;
}
.tech-logo:nth-child(10) {
  --logo-index: 9;
}
.tech-logo:nth-child(11) {
  --logo-index: 10;
}
.tech-logo:nth-child(12) {
  --logo-index: 11;
}
.tech-logo:nth-child(13) {
  --logo-index: 12;
}

.tech-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 10px;
  background: inherit;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.tech-logo:hover::before {
  opacity: 0.7;
}

.tech-logo:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  animation-play-state: paused;
}

@keyframes logoGlow {
  0%,
  100% {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  }
}

.html {
  background: linear-gradient(135deg, #e34c26, #f06529);
}
.php {
  background: linear-gradient(135deg, #777bb3, #8892bf);
}
.csharp {
  background: linear-gradient(135deg, #68217a, #9b4f96);
}
.ruby {
  background: linear-gradient(135deg, #cc342d, #e0115f);
}
.python {
  background: linear-gradient(135deg, #306998, #ffd43b);
}
.java {
  background: linear-gradient(135deg, #f89820, #5382a1);
}
.js {
  background: linear-gradient(135deg, #f0db4f, #323330);
  color: #323330;
}
.asm {
  background: linear-gradient(135deg, #6e4c13, #8c6239);
}
.cpp {
  background: linear-gradient(135deg, #00599c, #004482);
}
.perl {
  background: linear-gradient(135deg, #39457e, #5a7da2);
}
.c {
  background: linear-gradient(135deg, #555555, #333333);
}
.go {
  background: linear-gradient(135deg, #00add8, #29beb0);
}
.bash {
  background: linear-gradient(135deg, #4eaa25, #3c9825);
}

.tech-layers {
  margin-top: 80px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.layer-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.layer {
  width: 100%;
  padding: 25px;
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  margin-bottom: 8px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.layer:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.layer::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: -1;
  opacity: 0;
  transition: all 0.5s ease;
}

.layer:hover::before {
  width: 150%;
  height: 150%;
  opacity: 0.1;
}

.layer-arrow {
  font-size: 28px;
  margin: 8px 0;
  color: #1677ff;
  animation: bounce 2s infinite;
  position: relative;
}

.layer-arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(22, 119, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: arrowGlow 3s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@keyframes arrowGlow {
  0%,
  100% {
    width: 0;
    height: 0;
    opacity: 0;
  }
  50% {
    width: 60px;
    height: 60px;
    opacity: 1;
  }
}

.app-layer {
  background-color: rgba(245, 34, 45, 0.05);
  color: #f5222d;
  border-left: 4px solid #f5222d;
}
.dev-layer {
  background-color: rgba(160, 217, 17, 0.05);
  color: #a0d911;
  border-left: 4px solid #a0d911;
}
.sys-layer {
  background-color: rgba(19, 194, 194, 0.05);
  color: #13c2c2;
  border-left: 4px solid #13c2c2;
}
.hw-layer {
  background-color: rgba(114, 46, 209, 0.05);
  color: #722ed1;
  border-left: 4px solid #722ed1;
}

/* 滚动动画样式 */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* 不同类型的滚动动画 */
.scroll-animate.slide-left {
  transform: translateX(-50px);
}

.scroll-animate.slide-left.animate-in {
  transform: translateX(0);
}

.scroll-animate.slide-right {
  transform: translateX(50px);
}

.scroll-animate.slide-right.animate-in {
  transform: translateX(0);
}

.scroll-animate.scale-in {
  transform: scale(0.8) translateY(50px);
}

.scroll-animate.scale-in.animate-in {
  transform: scale(1) translateY(0);
}

.scroll-animate.fade-up {
  transform: translateY(30px);
}

.scroll-animate.fade-up.animate-in {
  transform: translateY(0);
}

/* 延迟动画 */
.scroll-animate.delay-100 {
  transition-delay: 0.1s;
}

.scroll-animate.delay-200 {
  transition-delay: 0.2s;
}

.scroll-animate.delay-300 {
  transition-delay: 0.3s;
}

.scroll-animate.delay-400 {
  transition-delay: 0.4s;
}

.scroll-animate.delay-500 {
  transition-delay: 0.5s;
}

/* 响应式调整 */
@media (max-width: 1399px) {
  section {
    padding: 90px 6%;
  }

  .advantage-card {
    padding: 30px;
  }
}

@media (max-width: 1199px) {
  section {
    padding: 80px 5%;
  }

  .feature-tabs {
    margin: 60px auto 0;
    width: 90%;
  }

  .tab-content {
    padding: 30px 40px;
  }

  .advantage-card {
    padding: 25px;
  }
}

@media (max-width: 991px) {
  section {
    padding: 70px 4%;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .section-subtitle {
    font-size: 1.15rem;
  }

  .tab-content {
    padding: 25px 30px;
  }

  .tab-content h3 {
    font-size: 1.6rem;
  }

  .advantage-card {
    padding: 20px;
  }
}

@media (max-width: 767px) {
  section {
    padding: 60px 4%;
  }

  .hero-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
  }

  .hero-button {
    height: 48px;
    font-size: 1.1rem;
    padding: 0 30px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-header {
    margin-bottom: 50px;
  }

  .tab-video-container {
    height: 280px;
  }

  .tab-video-container::after {
    width: 60px;
    height: 60px;
    background-size: 20px 20px;
  }

  .tab-video-container .video-time {
    font-size: 10px;
    padding: 2px 6px;
  }

  .tab-content {
    padding: 20px;
  }

  .advantage-icon {
    flex: 0 0 50px;
    height: 50px;
    font-size: 22px;
    margin-right: 15px;
  }

  .layer {
    padding: 18px;
    font-size: 16px;
  }
}

@media (max-width: 575px) {
  section {
    padding: 50px 20px;
  }

  .hero-section {
    min-height: 550px;
    padding: 0 20px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  :deep(.ant-tabs-tab) {
    padding: 10px 15px !important;
    font-size: 16px !important;
  }

  .tab-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .tab-content p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .advantage-card {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .advantage-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .module-group-title {
    font-size: 1.4rem;
  }

  .modules-layout {
    flex-direction: column;
    gap: 40px;
  }

  .cards-section {
    flex: none;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .module-card {
    width: 100%;
    max-width: 320px;
    padding: 20px;
    height: 160px;
  }

  .sides-section {
    flex: none;
    min-width: auto;
  }

  .side-categories {
    position: static;
    gap: 20px;
  }

  .side-category {
    padding: 20px;
  }

  .side-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .side-content h3 {
    font-size: 1.2rem;
  }

  .side-content p {
    font-size: 0.85rem;
  }

  .module-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .module-content h4 {
    font-size: 1.1rem;
  }

  .module-content p {
    font-size: 0.85rem;
  }

  .tech-card {
    height: 100px;
  }

  .tech-logos {
    margin: 50px auto;
  }

  .tech-logo {
    height: 70px;
    font-size: 15px;
    margin-bottom: 15px;
  }
}
</style>
